
import DeviceMessageList from './DeviceMessageList';
import PersonMessageList from './PersonMessageList';

export const BasisMessage = (Form, formItemLayout, details) => (
  <Form style={{'marginTop': '20px'}}>
    <Form.Item
      {...formItemLayout}
      label="规则名称"
    >
      <p>{details.name}</p>
    </Form.Item>
    <Form.Item
      {...formItemLayout}
      label="任务类型"
    >
      <p>{details.taskTypeName}</p>
    </Form.Item>
    <Form.Item
      {...formItemLayout}
      label="分配方式"
    >
      <p>{details.allotTypeName}</p>
    </Form.Item>
    <Form.Item
      {...formItemLayout}
      label="规则开始时间"
    >
      <p>{details.beginTime}</p>
    </Form.Item>
    <Form.Item
      {...formItemLayout}
      label="规则结束时间"
    >
      <p>{details.endTime}</p>
    </Form.Item>
    <Form.Item
      {...formItemLayout}
      label='工作天数（默认7）'
    >
      <p>{details.workDay}</p>
    </Form.Item>
    <Form.Item
      {...formItemLayout}
      label="检查频率（天/次）"
    >
      <p>{details.cycle}</p>
    </Form.Item>
  </Form>
);

export const DeviceMessage = (id) => (
  <DeviceMessageList id={id}/>
);

export const PersonMessage = (id) => (
  <PersonMessageList id={id}/>
);
